package com.gtw.modules.api.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.gtw.modules.api.service.TbWalletpaylogService;
import com.gtw.modules.dao.TbWalletPayLogDao;
import com.gtw.modules.entity.TbAddress;
import com.gtw.modules.entity.TbWalletPayLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("walletpaylogservice")
public class TbWalletpaylogServiceImpl implements TbWalletpaylogService {
    @Autowired
    private TbWalletPayLogDao tbWalletPayLogDao;

    @Override
    public TbWalletPayLog queryObject(Integer id) {
        return tbWalletPayLogDao.selectByPrimaryKey(id);
    }

    @Override
    public void save(TbWalletPayLog walletpaylog) {
        tbWalletPayLogDao.insert(walletpaylog);
    }

    @Override
    public void update(TbWalletPayLog walletpaylog) {
        tbWalletPayLogDao.updateByPrimaryKey(walletpaylog);
    }

    @Override
    public void delete(Integer id) {
        TbWalletPayLog tw = tbWalletPayLogDao.selectByPrimaryKey(id);
        tw.setIddelete(true);
        tbWalletPayLogDao.updateByPrimaryKey(tw);
    }

    @Override
    public List<TbWalletPayLog> queryByUid(String uid) {
        return tbWalletPayLogDao.queryByUid(uid);
    }

    @Override
    public Page<TbWalletPayLog> queryPageList(Page<TbWalletPayLog> pageUtil, Map<String, Object> map) {
        pageUtil.setRecords(tbWalletPayLogDao.queryPageList(pageUtil, map));
        return pageUtil;
    }

    @Override
    public Page<TbWalletPayLog> queryPageList2(Page<TbWalletPayLog> pageUtil, Map<String, Object> map) {
        pageUtil.setRecords(tbWalletPayLogDao.queryPageList2(pageUtil, map));
        return pageUtil;
    }
}
